import { _decorator, Component, Label, Node } from 'cc';

import { Report, SideType } from '../entity/Report';
import { reportInfo_Attack } from '../entity/reportInfo_Attack';
const { ccclass, property } = _decorator;

@ccclass('Resource')
export class Resource extends Component {
    @property(Label)
    tittle:Label
    @property(Label)
    wood:Label
    @property(Label)
    mud:Label
    @property(Label)
    iron:Label
    @property(Label)
    food:Label

    start() {

    }

    setData(wood:number, mud:number, iron:number, food:number, tittle?:string) {
        this.wood.string = wood + ''
        this.mud.string = mud + ''
        this.iron.string = iron + ''
        this.food.string = food + ''

        if(tittle){
            this.tittle.string = tittle
        }
    }
}


